import {PageData, RefreshListConfig} from "@hhd/plat/RefreshList/RefreshListType";
import {Ref, ref} from "vue";


type Param = {
  queryParams: any;
  loadPage(params: any, loaded: (datas: PageData) => void): void;
}

function refreshListConfig(param: Param): Ref<RefreshListConfig> {
  return ref({
    page: {
      current: 0,
      pageSize: 20
    },
    dataSource: [],
    queryParams: param.queryParams,
    loadPage: param.loadPage
  });
}

export {
  refreshListConfig
}